package kr.or.javacafe.USCM.USCM103.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import kr.or.javacafe.USCM.USCM103.service.USCM103Service;
import kr.or.javacafe.USCM.USCM103.web.USCM103Controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;


public class USCM103Controller extends MultiActionController{
	
protected final static Log logger = LogFactory.getLog(USCM103Controller.class);
	
	private USCM103Service uscm103Service;
	
	public void setUscm103Service(USCM103Service uscm103Service){
		this.uscm103Service = uscm103Service;
	}
	

	
	public ModelAndView uscm103Main(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		ModelAndView returnPage = new ModelAndView("USCM103/uscm103Main");		
		return returnPage;
	}

		
	public ModelAndView findMemberList(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		if (logger.isDebugEnabled()){ logger.debug("Entering " + getClass() + "." + "ajax_path_normal()"); }
		
		List objList = uscm103Service.findMemberList();
		
		ModelAndView returnPage = new ModelAndView("JSON", "JSON_DATA", objList);	
		returnPage.addObject("objList", objList);
		
		return returnPage;
	}
}
